import requests as rq
from PIL import Image
from io import BytesIO

r = rq.get('https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1586527846573&di=5ce5a5dfde2c548d8fb75b95b0ecf3c7&imgtype=0&src=http%3A%2F%2Fimage.game.uc.cn%2F2014%2F9%2F12%2F9908985.jpg')
if (r.status_code == 200):
    print("请求" "成功")
    i = Image.open(BytesIO(r.content))
    i.save('hm2.jpg')
    #with open ('./hm.jpg', 'wb') as f:
    #    f.write(r.content)
